<!DOCTYPE html>
<html>
<head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>FC Tank - a coffeescript rewritten of classic 90 tank on Nintendo Family Computer</title>
  <script type="text/javascript" src="js/coffeescript-v1.6.2.min.js"></script>
  <script type='text/javascript' src='js/jquery-v1.9.1.min.js'></script>
  <script type='text/javascript' src='js/lodash-v1.2.1.min.js'></script>
  <script type='text/javascript' src="js/kinetic-v4.5.1.min.js"></script>
  <script type='text/javascript' src="js/howler-v1.1.5.min.js"></script>
  <style type='text/css'>
    #tank_sprite { display: none; }
    #canvas {
      background: #000;
      width: 600px;
      height: 520px;
    }
    #tv_wrapper {
      width: 600px;
      height: 520px;
      padding: 192px 363px 210px 237px;
      background: #666 url('image/tv_bg.jpg');
    }
    body { background: #999; }
    strong { font-weight: bold; }
  </style>
  <script type="text/coffeescript">
    loadCoffee = (files) ->
      $head = $ "head"
      compile_and_add = (content) ->
        compiled = CoffeeScript.compile content, {bare: on}
        $("<script />").attr("type", "text/javascript").html(compiled).appendTo $head
      load = (file) ->
        $.ajax {
          url: file,
          success: compile_and_add,
          dataType: 'text'
          async: false
        }
      load file for file in files
    loadCoffee [
      "src/constant.coffee",
      "src/engine/data_structures.coffee",
      "src/engine/sound.coffee",
      "src/engine/keyboard.coffee",
      "src/engine/scene.coffee",
      "src/engine/view.coffee",
      "src/map/point.coffee",
      "src/map/map_area_2d.coffee",
      "src/map/map_area_2d_vertex.coffee",
      "src/map/map_2d.coffee",
      "src/map/map_unit_2d.coffee",
      "src/map/movable_map_unit_2d.coffee",
      "src/map/terrains.coffee",
      "src/map/tiled_map_builder.coffee",
      "src/objects/tanks.coffee",
      "src/objects/missile.coffee",
      "src/objects/gifts.coffee",
      "src/objects/commanders.coffee",
      "src/scenes/welcome_scene.coffee",
      "src/scenes/stage_scene.coffee",
      "src/scenes/report_scene.coffee",
      "src/scenes/battle_field_scene.coffee",
      "src/views/welcome_view.coffee",
      "src/views/stage_view.coffee",
      "src/views/battle_field_view.coffee",
      "src/views/report_view.coffee",
      "src/game.coffee"
      "src/bootstrap.coffee"
    ]
  </script>
</head>
<body>
  <img id="tank_sprite" alt="tanks" width="400" height="360" src="image/tanks.png" />
  <div id="tv_wrapper">
    <div id="canvas"></div>
  </div>
  <div id="game_instructions">
    <dl class="p1">
      <dt>P1 Control</dt>
      <dd>Press keyboard <strong>UP, DOWN, LEFT, RIGHT</strong> to move</dd>
      <dd>Press keyboard <strong>Z</strong> to fire</dd>
      <dd>Press keyboard <strong>SPACE</strong> to toggle 1 user or 2 users mode</dd>
      <dd>Press keyboard <strong>ENTER</strong> to start game or toggle game start/pause</dd>
    </dl>
    <dl class="p2">
      <dt>P2 Control</dt>
      <dd>Press keyboard <strong>W, S, A, D</strong> to move</dd>
      <dd>Press keyboard <strong>J</strong> to fire</dd>
    </dl>
  </div>
</body>
</html>
